from selenium import webdriver
from selenium.webdriver.chrome.service import Service


class OpenService:
    # 浏览器驱动路径
    CHROME_DRIVER_PATH = r"D:\softwarework\python310\chromedriver.exe"

    @staticmethod
    def get_chrome_driver():
        """返回一个 Chrome 浏览器实例"""
        service = Service(executable_path=OpenService.CHROME_DRIVER_PATH)
        driver = webdriver.Chrome(service=service)
        return driver
